{% extends "homepage.html" %}

{% block content %}

<script type="text/javascript" src="{{ url_for('emf.static', filename='elliptic_modular_form_util-functions.js') }}"></script>
<script type="text/javascript" src="{{ url_for('emf.static', filename='elliptic_modular_form_scripts.js') }}"></script>


{% if info.error is defined %}

<h1>There was an error in meeting your previous request. Please change parameters.</h1>

<h2> Error message: </h2>% extends "homepage.html" %}

<div>
{{ info.error | safe }}
</div>
{% endif %}
<table>
  <tr>
    <td>
      {% if info.weight is defined %}
      <h1>{{KNOWL('mf.maass.mwf',title='Maass forms')}} of {{KNOWL('mf.maass.weight',title='weight')}} {{info.weight}}</h1>
      {% else %}
      <h1>Maass waveforms</h1>
      {% endif %}
      {% if info.table is defined and info.table.table is defined %}
      {% set table = info.table.table %}
      {% set row_class = cycler('odd', 'even') %}
      <table class="ntdata">
        <tbody>
          <tr>
            {% for tbl  in table %}
            <td valign="top">
              <table class="ntdata">
                {% if info.table.weights != 0 %}
                <thead>
                  <tr>
                    <td>Level {{tbl.N}} and Weight {{tbl.k}}</td>

                   </tr></thead>
                {% else %}
                <thead><tr><td>Level {{tbl.N}}</td></tr></thead>
                 {% endif %}
                <tbody>
                  {% for row in tbl.evs %}
                  <tr class="{{ row_class.next() }}">
                    <td>
                      <span>
                      <a style="display:inline"
                      href="{{row.url}}">{{row.R}}</a>
                      {# <sup><small>{{row.name}}</small></sup> #}
                      </span>
                      <div id="detailed_info">
                       
                      </div>
                    </td>
                    <td>
                      {{row.numc}}
                    </td>

                  </tr>
                  {% endfor %}
                </tbody>
              </table>
            </td>
            {% endfor %}
          </tr>
        </tbody>

      </table>
      <div>
        <small>
        <form name="browse" method="post">
        <hidden name="skip" value="{{info.table.skip[0]}}">
        <hidden name="limit" value="{{info.table.limit[0]}}">
        {%for skip in info.table.paging %}
         <a href="{{skip.url}}" onclick="document.browse.skip={{skip.skip}}">{{skip.k0}}--{{skip.k1}} </a>

        {%endfor%}
        </form>
      </small>
      </div>
 

      <p>
      <div>        
      {% if info.table.metadata is defined %}
<div>
More data can be accessed by searching.
</div>
<p>
      Contributors to data on this page:
      <ul>
          
        {% for rec in info.table.metadata %}
        {% set name = rec.contributor %}
        {% set knowl = rec["knowl-tag"] %}
        <li>
          {# Note that this KNOWL is stored in the database #}
          {# {{ KNOWL(knowl,title=name) }}  #}
         {{name}}
        </li>
        {% endfor %}
      </ul>
      {% else %}
            No metadata available for this data set!
      </div>
      {% endif %}
      {% else %}
      There are no Maass Forms in the database satisfying the provided criteria.
      {% endif %}
    </td>
  </tr>
  <tr>
</table>

</div>

{% endblock content %}
